<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta http-equiv="Access-Control-Allow-Origin" content="*">
  <link rel="stylesheet" href="dist/muses.min.css">
  <title>Muse Autocomplete Demo</title>
  <style>
    div#header, div#footer {
      margin-bottom: 15px;
      border: 1px solid gray;
      width: 100%;
      height: 20px;
    }
  </style>
</head>

<body class="bg-info" style="padding-bottom: 100px">

  <div id="header">I am a div.</div>

  <div id="tag" data-name="tag" data-id="uuid">["java", "daimafans", "springboot"]</div>
  <div id="single" data-name="single" data-id="uuid">springboot</div>

  <div id="footer">I am another div.</div>

</body>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="dist/muses.min.js"></script>
<script type="text/javascript">
  $('#tag').autoComplete({
    url: 'https://www.daimafans.com/tag/fuzzy',
    id: 'tags',
    name: 'tags',
    placeholder: '标签：1到5个标签',
    defineFunc: function (text) {
      console.log(text);
    }
  });
  $('#single').autoComplete({
    url: 'https://www.daimafans.com/tag/fuzzy',
    id: 'singleid',
    name: 'singlename',
    placeholder: '1个标签',
    single: true
  });
</script>

</html>